<template>
  <div class="info box radial-gradient-demo">
    <div class="infocontainer clmcenter">
      <img
        src="../assets/img/back.png"
        class="back"
        @click="$router.replace('/index2022')"
      />
      <button
        class="infobtn"
        v-for="item in nowlist"
        @click="toLink(item.link)"
      >
        {{ item.name }}
      </button>
    </div>
  </div>
</template>
<script>
import { Toast } from "vant";
export default {
  data() {
    return {
      nowlist: [],
      //答题类 已更新
      dtlist: [
        {
          name: "真力时答题邀约",
          link: "http://item.mhdigitaling.com/index.php/Zenith/Api/index",
        },
        {
          name: "广汽传祺答题",
          link: "https://h5.mahelei.com/2022/Gacmotor/index.html",
        },
        {
          name: "CK春季档店铺答题互动普通版",
          link: "https://h5.mahelei.com/2022/CK/CK-Normal/index.html",
        },
        {
          name: "金纺古风测试",
          link: "https://h5.mahelei.com/Jf/Api/index",
        },
        {
          name: "Moody路演答题",
          link: "https://h5.mahelei.com/2022/Moody/index.html?type=pc",
        },
        {
          name: "上汽质量月答题互动",
          link: "https://h5.mahelei.com/Gm/Index",
        },
      ],
      //常规类 已更新
      changguilist: [
        {
          name: "清扬宣传手册",
          link: "https://h5.mahelei.com/2022/Clear/",
        },
        { name: "复星进博会", link: "https://h5.mahelei.com/2022/Fosun" },
        {
          name: "哈啤盲盒兑换",
          link: "https://h5.mahelei.com/2022/HarbinMH",
        },{
          name: "奥妙点亮城市",
          link: "https://h5.mahelei.com/2022/Omo/index.html",
        },
      ],
      //投票抽奖类 已更新
      cjtplist: [
        {
          name: "力士姐型姐秀投票",
          link: "https://h5.mahelei.com/Lux2022/Index",
        },
        {
          name: "力士绿哈达点亮绿地",
          link: "https://h5.mahelei.com/Lhd/Index/index",
        },
        {
          name: "哈啤世界杯竞猜抽奖",
          link: "https://h5.mahelei.com/HarbinBeer/WorldCup/index",
        },
        {
          name: "亨氏抽奖互动",
          link: "https://h5.mahelei.com/Heinz/Api/index",
        },
        {
          name: "拓高乐打卡抽奖",
          link: "https://h5.mahelei.com/Topgolf/Api/index/source/normal",
        },
        {
          name: "朝日啤酒抽奖",
          link: "https://h5.mahelei.com/2022/Asahi/index.html",
        },
      ],
      //预约签到类 已更新
      yyqdlist: [
        {
          name: "轩尼诗酒店巡演邀请函",
          link: "https://h5.mahelei.com/2022/Hen2022/index.html",
        },
        {
          name: "Moody新品发布邀请函",
          link: "https://h5.mahelei.com/2022/MoodyIvt/index.html",
        },
        {
          name: "爱德王子628直播预热互动",
          link: "https://h5.mahelei.com/Shell2022/Index/index",
        },
        {
          name: "壳牌-吉利注册直播邀约",
          link: "https://h5.mahelei.com/Geely/Index",
        },
      ],
      //数据类 已更新
      datalist: [
        {
          name: "版纳旅游信息收集和游戏控制",
          link: "https://h5.mahelei.com/2022/ShellTravel/index.html",
        },
        {
          name: "爱德王子抖音PK赛",
          link: "https://h5.mahelei.com/2022/DouyinPK/index.html",
        },
      ],
      //照片互动类 已更新
      photolist: [
        {
          name: "爱德王子热爱系列互动",
          link: "https://h5.mahelei.com/Ade/Index",
        },
        {
          name: "CK图片像素风互动vip",
          link: "https://h5.mahelei.com/2022/CK/CK-xsf/index.html",
        },
        {
          name: "中联展厅区域打卡互动",
          link: "https://h5.mahelei.com/2022/Zoomlion/index.html",
        },
        {
          name: "Vivo图片上传提取",
          link: "https://h5.mahelei.com/2022/Vivo/index.html",
        },
      ],
      //全景类
      qjlist: [
        {
          name: "中联720全景",
          link: "https://www.720yun.com/t/20vk69pbzqe?scene_id=101520327",
        },
        {
          name: "阿斯利康全景",
          link: "https://www.720yun.com/t/3dvk6yf7d2q?scene_id=102643168",
        },
      ],
    };
  },
  created() {
    let from = this.$route.query.from;
    // console.log(from);
    if (from == "changgui") {
      this.nowlist = this.changguilist;
    } else if (from == "dt") {
      this.nowlist = this.dtlist;
    } else if (from == "tpcj") {
      this.nowlist = this.cjtplist;
    } else if (from == "photos") {
      this.nowlist = this.photolist;
    } else if (from == "yyqd") {
      this.nowlist = this.yyqdlist;
    } else if (from == "datas") {
      this.nowlist = this.datalist;
    } else if (from == "qj") {
      this.nowlist = this.qjlist;
    } else {
      Toast("暂无此分类");
    }
  },
  methods: {
    toLink(e) {
      setTimeout(() => {
        window.location.href = e;
      }, 300);
    },
  },
};
</script>
<style lang="less" scoped>
.info {
  // background:linear-gradient(30deg, #fff, #999);
  overflow-y: scroll;
  .infocontainer {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100%;
    z-index: 3;
    .btn1 {
      background-image: linear-gradient(
        to right,
        #fbc2eb 0%,
        #a6c1ee 51%,
        #fbc2eb 100%
      );
    }
    .btn2 {
      background-image: linear-gradient(
        to right,
        #a1c4fd 0%,
        #c2e9fb 51%,
        #a1c4fd 100%
      );
    }
  }
}
</style>
